<!--#begin newvacation -->
<script language="JavaScript">
<!--
function validateNum(field) {
var valid = ".0123456789"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
var d2;
alert("{ invalidentry }");
field.focus();
field.select();
return false;
   }
return true;
}

function validateDayField(field) {
	if( field.value.length > 0 && validateNum(field))
	{
	tp = parseFloat(field.value);
	if( isNaN(tp) )
		alert( '{ invalidentry1 }');

	if( tp % 0.5 != 0 )
		{
		var d1;
		alert( '{ invalidentry2 }' );
		field.focus();
		field.select();
		}
	var total = 0;
	for( i=0; i < document.vacform.elements.length; i++)
	{
		obj = document.vacform.elements[i];
		if( obj.name.substring(0, 6) == 'nbdays' || obj.name.substring(0, 12) == 'rgroup_value')
		{
			total += parseFloat(obj.value);
		}
	}
	document.vacform.elements['total'].value = total;
	}
}

function validateForm()
{
	var f = document.forms['vacform'];
	if ({ period_nbdays } != f.total.value) {
		//}
		return confirm('{ t_confirm_nomatch }');
	}
	return true;
}



function rgroup_display(obj, str_dest) {
	dest = document.getElementById(str_dest);
	obj = document.getElementById('bab_vac_right_'+obj.value);
	dest.innerHTML = obj.title;
}

//-->
</script>
<div align="center">
	<a  href="{ calurl }" onclick="bab_popup(this.href,5,1);return false;">{ calendar }</a>
</div>
<br />
<form name="vacform" method="post" action="{ babPhpSelf }" onSubmit="return validateForm();">
<input type="hidden" name="tg" value="vacuser" />
<input type="hidden" name="idx" value="vunew" />
<input type="hidden" name="action" value="vacation_request" />
<input type="hidden" name="begin" value="{ begin }" />
<input type="hidden" name="halfdaybegin" value="{ halfdaybegin }" />
<input type="hidden" name="end" value="{ end }" />
<input type="hidden" name="halfdayend" value="{ halfdayend }" />
<input type="hidden" name="period_nbdays" value="{ period_nbdays }" />
<input type="hidden" name="id" value="{ id }" />
<input type="hidden" name="id_user" value="{ id_user }" />
<input type="hidden" name="rfrom" value="{ rfrom }" />
<!--#if ide -->
<input type="hidden" name="ide" value="{ ide }" />
<!--#endif ide -->

	<table class="BabLoginCadreBackground" width="70%" border="0" cellspacing="0" cellpadding="2" align="center">
	<tr> 
	<td> 
		<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="4">
		<tr> 

			<td colspan="2" align="center"> 
				{ username }
			</td>
		</tr>
		
		<tr> 
			<td align="right">{ datebegintxt } : </td>
			<td> 
				{ datebegin }

				
			</td>
		</tr>
		<tr> 
			<td align="right">{ dateendtxt } : </td>
			<td> 
				{ dateend }
			</td>
		</tr>
		<tr> 
			<td align="right">{ nbdaystxt }: </td>
			<td> 
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td colspan="2">&nbsp;</td>
						<td>{ balancetxt }</td>
					</tr>
					<!--#in getnextright -->
					<!--#if id_rgroup -->
					<tr>
						<td>
							<input type="text" name="rgroup_value[{ id_rgroup }]" size="5" maxlength="5" value="{ nbdays }" onKeyUp="validateDayField(this)" />
						</td>
						<td>
							{ rgroup } : 
							<select name="rgroup_right[{ id_rgroup }]" onchange="rgroup_display(this, 'bab_vac_rgroup_display{ id_rgroup }')">
								<!--#in getnextrgroupright -->
								<option id="bab_vac_right_{ id_right }" title="{ quantitydays }" value="{ id_right }" <!--#if selected --> selected="selected"<!--#endif selected -->>{ description }</option>
								<!--#endin getnextrgroupright -->
							</select>							
						</td>
						<td id="bab_vac_rgroup_display{ id_rgroup }"></td>
					</tr>

					<script type="text/javascript">
						rgroup_display(document.forms['vacform'].elements['rgroup_right[{ id_rgroup }]'], 'bab_vac_rgroup_display{ id_rgroup }');
					</script>
					<!--#else id_rgroup -->

					<tr>
						<td>
							<input type="text" name="nbdays[{ right[id] }]" size="5" maxlength="5" value="{ nbdays }" onkeyup="validateDayField(this)" />
						</td>
						<td>{ right[description] }</td>
						<td>{ right[quantitydays] }</td>
					</tr>
					<!--#endif id_rgroup -->
					<!--#endin getnextright -->
				</table>
			</td>
		</tr>
		<tr> 
			<td align="right">{ totaltxt } : </td>
			<td>
				<input type="text" name="total" size="5" maxlength="5" value="{ totalval }" />
				&nbsp; { t_period } <strong>{ period_nbdays }</strong> { t_days }
			</td>
		</tr>
		<tr> 
			<td align="right">{ remark } : </td>
			<td>
				<textarea cols="40" rows="10" name="remarks">{ remarks }</textarea>
			</td>
		</tr>
		<tr> 
			<td>&nbsp;</td>
			<td> 
				<input type="submit" name="Submit" value="{ addvac }" />
			</td>
		</tr>
		</table>
	</td>
	</tr>
	</table>
</form>
<br>
<!--#end newvacation -->

<!--#begin vwaitinglist -->
<form method="post" action="{ babPhpSelf }" name="listform">
<input type="hidden" name="tg" value="vacuser">
<input type="hidden" name="idx" value="lper">
<input type="hidden" name="add" value="vven">
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground"> 
	<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
		<tr class="BabSiteAdminTitleFontBackground"> 
			<td>{ nametxt }</td>
			<td>{ totaltxt }</td>
			<td>{ datebtxt }</td>
			<td>{ dateetxt }</td>
		</tr>
		<!--#in getnext -->
		<tr class="BabSiteAdminFontBackground"> 
			<td><a href="javascript: Start('{ url }', 'VacationWindow', 'width=500,height=380,status=no,resizable=yes,top=200,left=200');">{ urlname }</a></td>
			<td>{ total }</td>
			<td>{ dateb }</td>
			<td>{ datee }</td>
		</tr>
		<!--#endin getnext -->
	</table>
</td>
</tr>
</table>
</form>
<br>
<!--#end vwaitinglist -->

<!--#begin vrequestslist -->
<!--#if personal -->
<div align="center">
	<a href="{ calurl }" onclick="bab_popup(this.href,4,1);return false;">{ calendar }</a>
</div>
<!--#endif personal -->
<br />
<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td class="BabLoginCadreBackground"> 
	<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
		<tr class="BabSiteAdminTitleFontBackground"> 
			<td>{ nametxt }</td>
			<td>{ begindatetxt }</td>
			<td>{ enddatetxt }</td>
			<td>{ quantitytxt }</td>
			<td>{ statustxt }</td>
			<td align="center">{ t_edit }</td>
			<td align="center">{ t_delete }</td>
		</tr>
		<!--#in getnext -->
		<!--#if altbg --><tr class="BabSiteAdminFontBackground"><!--#else altbg --><tr class="BabForumBackground1"><!--#endif altbg -->
			<td><a href="{ url }" onclick="bab_popup(this.href,2,1);return false;">{ urlname }</a></td>
			<td>{ begindate }</td>
			<td>{ enddate }</td>
			<td>{ quantity }</td>
			<td>{ status }</td>
			<td align="center">
				<!--#if modify -->
				<a href="{ urledit }" title="{ t_edit }"><img src="{ babSkinPath }images/Puces/edit.gif" border="0" alt="{ t_edit }" /></a>
				<!--#endif modify -->
			</td>

			<td align="center">
				<!--#if modify -->
				<a href="{ urldelete }" title="{ t_delete }"><img src="{ babSkinPath }images/Puces/PuceDelete.png" border="0" alt="{ t_delete }" /></a>
				<!--#endif modify -->
			</td>
		</tr>
		<!--#endin getnext -->
		<tr>
			<td class="BabSiteAdminTitleFontBackground"> 
				&nbsp; 
				<!--#if topurl --><a href="{ topurl }"><img src="{ babSkinPath }images/Puces/arrowPrev3aa.gif" alt="{ t_first_page }" /></a><!--#endif topurl -->
				<!--#if prevurl --><a href="{ prevurl }"><img src="{ babSkinPath }images/Puces/arrowPrev3a.gif" alt="{ t_previous_page }" /></a><!--#endif prevurl -->
			</td>

			<td colspan="5" class="BabSiteAdminTitleFontBackground" align="center">
				{ t_position }
			</td>

			<td class="BabSiteAdminTitleFontBackground" align="right"> 

				<!--#if nexturl --><a href="{ nexturl }"><img src="{ babSkinPath }images/Puces/arrowNext3a.gif" alt="{ t_next_page }" /></a><!--#endif nexturl -->
				<!--#if bottomurl --><a href="{ bottomurl }"><img src="{ babSkinPath }images/Puces/arrowNext3aa.gif" alt="{ t_last_page }" /></a><!--#endif bottomurl -->
				&nbsp; 
			</td>
		</tr>
	</table>
</td>
</tr>
</table>
<!--#end vrequestslist -->

<!--#begin vedunload -->
<br><br><br><br>

<table class="BabLoginMenuBackground" width="50%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td> 
	<table class="" width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
	<tr> 
		<td class="BabErrorMessage" colspan="2" align="center">{ message } </td>
	</tr>
	<tr align="left" valign="middle">
		<td class="BabWarningBodyBackground" colspan="2" align="center"><a href="javascript:this.close()">{ close }</a> </td>
	</tr>
	</table>
</td>
</tr>
</table>
<br>

<script type="text/javascript">

	window.onunload = function() {
		window.opener.location.href='{ redirecturl }';
	};

	setTimeout("this.close()","1000");
</script>

<!--#end vedunload -->

<!--#begin ventrydetail -->
<br />

<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
	<td class="BabLoginCadreBackground"> 
		<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
		
		<tr>
			<td align="right" width="30%"><strong>{ daterequesttxt }:</strong></td>
			<td>{ daterequest }</td>
		</tr>
		<tr>
			<td align="right" width="30%"><strong>{ datebegintxt }:</strong></td>
			<td>{ datebegin }</td>
		</tr>
		<tr>
		<td align="right"><strong>{ dateendtxt }:</strong></td>
		<td>{ dateend }</td>
		</tr>
		<tr>
		<td align="right" width="30%"><strong>{ nbdaystxt }:</strong></td>
		<td>
		<!--#in getnexttype -->
		{ nbdays }&nbsp;&nbsp;&nbsp;&nbsp;{ typename }&nbsp;&nbsp;<br>
		<!--#endin getnexttype -->
		</td>
		</tr>
		<tr>
		<td align="right" width="30%"><strong>{ totaltxt }:</strong></td><td>{ totalval }</td>
		</tr>
		<tr>
		<td align="right" width="30%"><strong>{ commenttxt }:</strong></td><td>{ comment }</td>
		</tr>
		</table>
	</td>
</tr>
</table>
<br>


<table width="95%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
	<td class="BabLoginCadreBackground"> 
		<table class="BabLoginMenuBackground"  width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
		<!--#if approb -->
		<tr>
			<td align="right" width="30%"><strong>{ t_approb }:</strong></td>
			<td>{ approb }</td>
		</tr>
		<!--#endif approb -->
		<tr>
			<td align="right" valign="top" width="30%"><b>{ statustxt }:</b></td>
			<td>{ status }<br>
			<!--#in getnextuser -->
			<br>{ fullname }
			<!--#endin getnextuser -->
			</td>
		</tr>
		<tr>
			<td align="right" width="30%"><b>{ remarktxt }:</b></td>
			<td>{ remark }</td>
		</tr>
		</table>
	</td>
</tr>
</table>

<!--#end ventrydetail -->

<!--#begin calendarbyuser -->

<table class="noprint bab_calnavbar" width="100%" cellpadding="2" cellspacing="0">
	<tr class="BabLoginMenuBackground"> 
		<td class="prev">
			<a href="{ previousmonth }" title="{ t_previousmonth }" class="prev2"><strong>&lt;</strong></a> 
			<a href="{ previousyear }" title="{ t_previousyear }" class="prev1"><strong>&lt;&lt;</strong></a>
		</td>
		<td align="center">
			<a href="{ switchurl }">{ switchlabel }</a>
		</td>
		<td align="right" class="next">
			<a href="{ nextmonth }" title="{ t_nextmonth }" class="next2"><strong>&gt;</strong></a>
			<a href="{ nextyear }" title="{ t_nextyear }" class="next1"><strong>&gt;&gt;</strong></a>
		</td>
	</tr>
</table>
 
<div id="vacationcalendar" <!--#if popup --> class="popup rotate" <!--#endif popup -->>

<table class="calendar">
<caption>{ yearname } <!--#if nbusers "== 1" --> - { firstuser }<!--#endif nbusers --></caption>
<thead>
	<tr>
		<!--#if nbusers "> 1" -->
		<td colspan="2">&nbsp;</td>
		<!--#else nbusers -->
		<td>&nbsp;</td>
		<!--#endif nbusers -->
		<!--#in getdayname -->
		<td>{ dayname }</td>
		<!--#endin getdayname --> 
	</tr>
</thead>
<tbody id="vac_calendar_body">
	<!--#in getmonth -->
	<!--#in getnextuser -->
	<!--#if first -->
	<tr <!--#if nbusers "> 1" --> class="first" <!--#endif nbusers -->>	
		<th rowspan="{ rowspan }">{ monthname }</th>
	<!--#else first -->
	<tr class="inmonth">
	<!--#endif first -->
		<!--#if nbusers "> 1" -->
		<th class="user">{ username }</th>
		<!--#endif nbusers -->
		<!--#in getday -->

		<td class="{ day_classname }" <!--#if am_color --> style="background-color:#{ am_color }"<!--#endif am_color --> <!--#if tdtext --> title="{ tdtext }"<!--#endif tdtext -->>
		
			<!--#if halfday -->
			<div id="d.{ date }.0" class="{ am_classname }" <!--#if am_color --> style="background-color:#{ am_color }"<!--#endif am_color -->  title="{ am_text }" <!--#if am_clickable --> onclick="setPeriod(this)"<!--#endif am_clickable -->></div>
			<div id="d.{ date }.1" class="{ pm_classname }" <!--#if pm_color --> style="background-color:#{ pm_color }"<!--#endif pm_color -->  title="{ pm_text }" <!--#if pm_clickable --> onclick="setPeriod(this)"<!--#endif pm_clickable -->></div>
			<!--#endif halfday -->
		</td> 
		<!--#endin getday -->
	</tr>
	<!--#endin getnextuser -->
	<!--#endin getmonth -->
</tbody>
<tfoot>
	<tr>
		<td class="legend" colspan="<!--#if nbusers "> 1" -->33<!--#else nbusers -->32<!--#endif nbusers -->">
		
		

		<a href="#" onclick="show_hide_legend(this);return false;" class="plus">{ t_legend }</a>
		
		<ul id="bab_vac_legend">
			<!--#in getnexttype -->
			<li title="{ arr[description] }"><span class="used" style="background-color:#{ arr[color] }"> &nbsp; </span>{ arr[name] }</li>
			<!--#endin getnexttype -->
			<li><span class="nonworking" style="background-color:#{ nwd_color }"> &nbsp; </span>{ t_nonworking }</li>
			<li><span class="weekend"> &nbsp; </span>{ t_weekend }</li>
			<!--#if period -->
			<li><span class="selected"> &nbsp; </span>{ t_selected }</li>
			<!--#endif period -->
			<li><span class="used"> &nbsp; </span>{ t_non_used }</li>
			<li><span class="wait" style="background-color:blue"> &nbsp; </span>{ t_waiting }</li>
		</ul>

		<script type="text/javascript">
			function show_hide_legend(link) {
				obj = document.getElementById('bab_vac_legend');
				none = 'none' == obj.style.display;
				obj.style.display = none ? '' : 'none';
				if (null != link) {
					link.className = none ? 'minus' : 'plus';
				}
			}
			show_hide_legend();
		</script>

		</td>
	</tr>
</tfoot>
</table>



</div>

<!--#if popup -->
<div class="noprint" align="center">
<a href="javascript:window.print()"><img src="{ babSkinPath }images/Puces/Print.gif" border="0" alt="{ print }" align="absmiddle" />&nbsp;{ print }</a>&nbsp; &nbsp; &nbsp;
	<a href="#" onclick="window.close();return false;">{ close }</a>

	<script type="text/javascript">
	<!--
	function rotate(obj)
		{
		var el = document.getElementById('vacationcalendar');
		if ( obj.checked )
			{
			el.className='popup rotate';
			}
		else
			{
			el.className='popup';
			}
		}
	//-->
	</script>

</div>
<!--#endif popup -->



<!--#end calendarbyuser -->


<!--#begin period -->
<script language="JavaScript">
<!--

var begindate = false;
var firstclick = false;


function decompose_date(str) {
	tmp = str.split('.');
	arr = tmp[1].split('-');
	var r = new Array();
	r['year']	= arr[0];
	r['month']	= arr[1];
	r['day']	= arr[2];
	r['half']	= tmp[2];

	return r;
}

function setPeriod(obj, init)
	{
	if ((null == init && firstclick == false) || begindate == false)
		{
		firstclick = true;
		var setbegin = true;
		begindate = obj.id;
		}
	else {
		if(begindate > obj.id)
			{
			begindate = obj.id;
			}
		}

	var f = document.forms['vacform'];
	f.begin_tmp.value = begindate;
	f.end_tmp.value = obj.id;

	arr = decompose_date(begindate);
	dateBegin(arr['day'], arr['month'], arr['year'], arr['half']);

	arr = decompose_date(obj.id);
	dateEnd(arr['day'], arr['month'], arr['year'], arr['half']);

	setPeriod2();

	if (!setbegin)
		begindate = obj.id;
	}


function id_to_date(str) {
	arr = decompose_date(str);
	hours = 0;
	if (1 == arr['half']) {
		hours = 12;
	}

	return new Date(arr['year'], arr['month'], arr['day'], hours, 0, 0, 0);

}


function update_selection(obj, begindate, enddate) {

	if (obj.id >= begindate && obj.id <= enddate && (obj.className == 'free' || obj.className == 'selected' || obj.className == 'period'))
		{
		obj.className = 'period';
		return true;
		}
	else if (obj.className == 'period' || obj.className == 'selected' )
		{
		obj.className = 'free';
		}

	return false;
}


function setPeriod2()
	{
	var f = document.forms['vacform'];

	var nbd = 0;
	
	var tdlist = document.getElementById('vac_calendar_body').getElementsByTagName('td');
	
	for (var i = 0 ; i < tdlist.length ; i++)
		{
		
		if (tdlist[i].childNodes) {
			obj = tdlist[i].firstChild;
			if (obj) {
				do {
					if (1 == obj.nodeType && obj.id) {
						if (update_selection(obj, f.begin_tmp.value, f.end_tmp.value)) {
							nbd++;
						}
					}
					
				} while (obj = obj.nextSibling)
			}

			}
		}	



	f.period_nbdays.value = nbd/2;
	window.status = '{ t_period_nbdays } : '+nbd/2;
	
	if (document.getElementById(f.end_tmp.value))
		document.getElementById(f.end_tmp.value).className = 'selected';



	}


function update_plan()
{
	var f = document.forms['vacform'];

	var yearbegin = parseInt(f.yearbegin.value)-1+{ yearbegin };
	var yearend = parseInt(f.yearend.value)-1+{ yearend };

	var daybegin = f.daybegin.selectedIndex+1;
	var dayend = f.dayend.selectedIndex+1;

	daybegin = daybegin < 10 ? '0'+daybegin : daybegin;
	dayend = dayend < 10 ? '0'+dayend : dayend;

	var monthbegin = f.monthbegin.value < 10 ? '0'+f.monthbegin.value : f.monthbegin.value;
	var monthend = f.monthend.value < 10 ? '0'+f.monthend.value : f.monthend.value;

	f.begin_tmp.value = yearbegin+'-'+monthbegin+'-'+daybegin+'.'+f.halfdaybegin.value;
	f.end_tmp.value = yearend+'-'+monthend+'-'+dayend+'.'+f.halfdayend.value;

	setPeriod2();
}


function updateDates(elemDay, elemMonth, elemYear)
{
	ds = elemDay.selectedIndex;
	timeA = new Date(elemYear.options[elemYear.selectedIndex].text, elemMonth.options[elemMonth.selectedIndex].value,1);
	timeDifference = timeA - 86400000;
	timeB = new Date(timeDifference);
	var daysInMonth = timeB.getDate();
	for (var i = 0; i < elemDay.length; i++)
	{
	elemDay.options[0] = null;
	}
	for (var i = 0; i < daysInMonth; i++)
	{
	elemDay.options[i] = new Option(i+1);
	}
	if( ds < daysInMonth )
	elemDay.options[ds].selected = true;
	else
	elemDay.options[daysInMonth-1].selected = true;
}



function dateBegin(day, month, year, half)
{
	var f = document.forms['vacform'];
	f.elements['monthbegin'].options[month-1].selected = true;
	f.elements['yearbegin'].options[year-{ yearbegin }].selected = true;
	updateDates(f.elements['daybegin'], f.elements['monthbegin'], f.elements['yearbegin']);
	f.elements['daybegin'].options[day-1].selected = true;
	f.elements['halfdaybegin'].options[half].selected = true;
}

function dateEnd(day, month, year, half)
{
	var f = document.forms['vacform'];
	f.elements['monthend'].options[month-1].selected = true;
	f.elements['yearend'].options[year-{ yearbegin }].selected = true;
	updateDates(f.elements['dayend'], f.elements['monthend'], f.elements['yearend']);
	f.elements['dayend'].options[day-1].selected = true;
	f.elements['halfdayend'].options[half].selected = true;
}

function validateForm(fr)
{
var ret = true;
if( fr.yearbegin.selectedIndex > fr.yearend.selectedIndex )
	{
	ret = false;
	}
else if( fr.yearbegin.selectedIndex == fr.yearend.selectedIndex )
	{
		if( fr.monthbegin.selectedIndex > fr.monthend.selectedIndex )
		{
		ret = false;
		}
		else if( fr.monthbegin.selectedIndex == fr.monthend.selectedIndex ) 
		{
		if( fr.daybegin.selectedIndex > fr.dayend.selectedIndex )
			{
			ret = false;
			}
		}
	}

if( ret == false)
	{
	var d1;
	alert ('{ invaliddate }');
	return false;
	}

return true;
}
//-->
</script>

<form name="vacform" method="post" action="{ babPhpSelf }" onSubmit="return validateForm(this);">
<input type="hidden" name="tg" value="vacuser" />
<input type="hidden" name="idx" value="vunew" />
<input type="hidden" name="action" value="period" />
<input type="hidden" name="id" value="{ id }" />
<input type="hidden" name="year" value="{ year }" />
<input type="hidden" name="begin_tmp" value="0" />
<input type="hidden" name="end_tmp" value="0" />
<input type="hidden" name="period_nbdays" value="0" />
<input type="hidden" name="id_user" value="{ id_user }" />
<input type="hidden" name="rfrom" value="{ rfrom }" />
<!--#if ide -->
<input type="hidden" name="ide" value="{ ide }" />
<!--#endif ide -->

<table class="BabLoginCadreBackground" width="70%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr> 
<td> 
	<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="4">
	<tr> 
	<td align="right">
		{ datebegintxt } : 
	</td>
	<td> 
		<select name="daybegin" onchange="update_plan();">
		  <!--#in getnextday -->
		  <option value="{ dayid }">{ dayid }</option>
		  <!--#endin getnextday -->
		</select>
	</td>
	<td> 
		<select name="monthbegin" onChange="update_plan();updateDates(this.form.daybegin, this.form.monthbegin, this.form.yearbegin);">
		  <!--#in getnextmonth -->
		  <option value="{ monthid }">{ monthname }</option>
		  <!--#endin getnextmonth -->
		</select>
	</td>
	<td> 
		<select name="yearbegin" onChange="update_plan();updateDates(this.form.daybegin, this.form.monthbegin, this.form.yearbegin);">
		  <!--#in getnextyear -->
		  <option value="{ yearid }">{ yearidval }</option>
		  <!--#endin getnextyear -->
		</select>
	</td>
	<td> 
		<select name="halfdaybegin" onchange="update_plan();">
		  <!--#in getnexthalf -->
		  <option value="{ halfid }" { selected }>{ halfname }</option>
		  <!--#endin getnexthalf -->
		</select>
	</td>
</tr>
<tr> 
	<td align="right">
		{ dateendtxt } : 
	</td>
	<td> 
		<select name="dayend" onchange="update_plan();">
		  <!--#in getnextday -->
		  <option value="{ dayid }">{ dayid }</option>
		  <!--#endin getnextday -->
		</select>
	</td>
	<td> 
		<select name="monthend" onChange="updateDates(this.form.dayend, this.form.monthend, this.form.yearend);update_plan();">
		  <!--#in getnextmonth -->
		  <option value="{ monthid }">{ monthname }</option>
		  <!--#endin getnextmonth -->
		</select>
	</td>
	<td> 
		<select name="yearend" onChange="updateDates(this.form.dayend, this.form.monthend, this.form.yearend);update_plan();">
		  <!--#in getnextyear -->
		  <option value="{ yearid }">{ yearidval }</option>
		  <!--#endin getnextyear -->
		</select>
	</td>
	<td> 
		<select name="halfdayend"  onchange="update_plan();">
		  <!--#in getnexthalf -->
		  <option value="{ halfid }" { selected }>{ halfname }</option>
		  <!--#endin getnexthalf -->
		</select>
	</td>
	</tr>
	<tr> 
		<td>&nbsp;</td>
		<td colspan="4"> 
		<input type="submit" name="Submit" value="{ addvac }" />

		<script type="text/javascript">
			function view_rights() {
				obj = document.getElementById('view_rights');
				if (obj.style.display == 'none') {
					obj.style.display = '';
				} else {
					obj.style.display = 'none';
				}
			}
		</script>


		&nbsp; &nbsp;<a href="javascript:view_rights();"><img src="{ babSkinPath }images/Puces/asc_order.png" border="0" />  { t_view_rights }</a>

		<br />
		<br />
		</td>
	</tr>
	<tbody id="view_rights" style="display:none">
		<tr> 
			<td colspan="2" align="right">&nbsp;</td>
			<td colspan="2" align="center">{ t_avariable_days }</td>
			<td colspan="1" align="center">{ t_waiting_days }</td>
		</tr>
		<!--#in getnextright -->
		<tr> 
			<td colspan="2" align="right">{ right[description] }</td>
			<td colspan="2" align="center">{ right[quantitydays] }</td>
			<td colspan="1" align="center">{ right[waiting] }</td>
		</tr>
		<!--#endin getnextright -->
		<tr> 
			<th colspan="2" align="right">{ t_total }</th>
			<th colspan="2" align="center">{ total }</th>
			<th colspan="1" align="center">{ total_waiting }</th>
		</tr>
	</tbody>
	</table>
</td>
</tr>
</table>
</form>
<script type="text/javascript">
<!--
function initialize()
{
var daybegin = parseInt('{ daybegin }');
var monthbegin = parseInt('{ monthbegin }');
var yearbegin = parseInt('{ yearbegin }');
var halfdaybegin = parseInt('{ halfdaybegin }');

var dayend = parseInt('{ dayend }');
var monthend = parseInt('{ monthend }');
var yearend = parseInt('{ yearend }');
var halfdayend = parseInt('{ halfdayend }');


dateBegin( daybegin, monthbegin, yearbegin, halfdaybegin);
dateEnd( dayend, monthend, yearend, halfdayend);

}

begindate = '{ yearbegin }-{ monthbegin }-{ daybegin }.{ halfdaybegin }';
if (td = document.getElementById('{ yearend }-{ monthend }-{ dayend }.{ halfdayend }')) {
	setPeriod(td, true);
	}

initialize();
-->
</script>
<!--#end period -->


<!--#begin delete -->

<table width="70%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
	<td class="BabLoginCadreBackground"> 
		<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
			
			<tr>
				<td align="center" colspan="2"><br />
					<h5>{ owner }</h5><br />
				</td>
			</tr>
			
			
			<tr>
				<td align="right" width="30%">{ datebegintxt } :</td>
				<td>{ datebegin }</td>
			</tr>
			<tr>
				<td align="right">{ dateendtxt } :</td>
				<td>{ dateend }</td>
			</tr>

			<tr>
				<td align="right">{ nbdaystxt }:</td>
				<td>
				<!--#in getnexttype -->
				{ nbdays }&nbsp;&nbsp;&nbsp;&nbsp;{ typename }&nbsp;&nbsp;<br>
				<!--#endin getnexttype -->
				</td>
			</tr>
			
			<tr>
				<td align="right">{ totaltxt } :</td>
				<td>{ totalval }</td>
			</tr>
			<tr>
				<td align="right">{ commenttxt } :</td>
				<td>{ comment }</td>
			</tr>


			<tr>
				<td align="right" valign="top">{ statustxt } :</td>
				<td>{ status }<br />
				<!--#in getnextuser -->
				{ fullname }<br />
				<!--#endin getnextuser -->
				</td>
			</tr>
			<tr>
				<td align="right" valign="top">{ remarktxt } :</td>
				<td>{ remark }<br /><br /><br /></td>
			</tr>

			<tr>
				<td colspan="2" align="center">
					<div class="BabSiteAdminFontBackground">
					<br />
					<h5>{ t_deleteconfirm }</h5>
					
					<form name="vacform" method="post" action="{ babPhpSelf }">
						<p>
							<input type="hidden" name="tg" value="vacuser" />
							<input type="hidden" name="action" value="delete_request" />
							<input type="hidden" name="id_entry" value="{ id_entry }" />
							<input type="hidden" name="url" value="{ url }" />
							<input type="submit" value="{ t_delete }" />
							<br />
							<br />
						</p>
					</form>
					
					</div>
				</td>
			</tr>
		</table>
	</td>
</tr>
</table>

<!--#end delete -->


<!--#begin viewrights -->
<table width="70%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
	<td class="BabLoginCadreBackground"> 
		<table class="BabLoginMenuBackground" width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
			<thead>
			<tr class="BabSiteAdminTitleFontBackground"> 
				<td align="right">&nbsp;</td>
				<td align="center">{ t_avariable_days }</td>
				<td align="center">{ t_waiting_days }</td>
			</tr>
			</thead>
			<tbody>
			<!--#in getnextright -->
			<!--#if altbg --><tr class="BabSiteAdminFontBackground"><!--#else altbg --><tr class="BabForumBackground1"><!--#endif altbg --> 
				<td align="right">{ right[description] }</td>
				<td align="center">{ right[quantitydays] }</td>
				<td align="center">{ right[waiting] }</td>
			</tr>
			<!--#endin getnextright -->
			</tbody>
			<tfoot>
			<tr class="BabSiteAdminTitleFontBackground"> 
				<th align="right">{ t_total }</th>
				<th align="center">{ total }</th>
				<th align="center">{ total_waiting }</th>
			</tr>
			</tfoot>
		</table>
	</td>
</tr>
</table>
<!--#end viewrights -->